
#ifndef MEMFILL_CALL_TABLE_H__
#define MEMFILL_CALL_TABLE_H__

/*########################## Lookup table for MOV ##########################*/
struct mov_struct {
	gchar *op1;
	gchar *op2;
	gchar *code;
};

struct mov_struct mov_lookup[8][8]={ 
										{{"B","B","40"},{"B","C","41"},{"B","D","42"},{"B","E","43"},{"B","H","44"},{"B","L","45"},{"B","M","46"},{"B","A","47"}},
										{{"C","B","48"},{"C","C","49"},{"C","D","4A"},{"C","E","4B"},{"C","H","4C"},{"C","L","4D"},{"C","M","4E"},{"C","A","4F"}},
										{{"D","B","50"},{"D","C","51"},{"D","D","52"},{"D","E","53"},{"D","H","54"},{"D","L","55"},{"D","M","56"},{"D","A","57"}},
										{{"E","B","58"},{"E","C","59"},{"E","D","5A"},{"E","E","5B"},{"E","H","5C"},{"E","L","5D"},{"E","M","5E"},{"E","A","5F"}},
										{{"H","B","60"},{"H","C","61"},{"H","D","62"},{"H","E","63"},{"H","H","64"},{"H","L","65"},{"H","M","66"},{"H","A","67"}},
										{{"L","B","68"},{"L","C","69"},{"L","D","6A"},{"L","E","6B"},{"L","H","6C"},{"L","L","6D"},{"L","M","6E"},{"L","A","6F"}},
										{{"M","B","70"},{"M","C","71"},{"M","D","72"},{"M","E","73"},{"M","H","74"},{"M","L","75"},{"M","M","X"},{"M","A","77"}},
										{{"A","B","78"},{"A","C","79"},{"A","D","7A"},{"A","E","7B"},{"A","H","7C"},{"A","L","7D"},{"A","M","7E"},{"A","A","7F"}}
									};
																							
/*####################### Lookup Table for various MNEMONICS ##################*/																					
struct mnemonic_lookup {
	gchar *op1;
	gchar *code;
};
                                          
struct mnemonic_lookup adc_lookup[]={
										{"B","88"},{"C","89"},{"D","8A"},{"E","8B"},
										{"H","8C"},{"L","8D"},{"M","8E"},{"A","8F"}
									};
																										
	
struct mnemonic_lookup add_lookup[]={
										{"B","80"},{"C","81"},{"D","82"},{"E","83"},
										{"H","84"},{"L","85"},{"M","86"},{"A","87"}
									};
														

struct mnemonic_lookup ana_lookup[]={
										{"B","A0"},{"C","A1"},{"D","A2"},{"E","A3"},
										{"H","A4"},{"L","A5"},{"M","A6"},{"A","A7"}
									};		
									
												
struct mnemonic_lookup cmp_lookup[]={
										{"B","B8"},{"C","B9"},{"D","BA"},{"E","BB"},
										{"H","BC"},{"L","BD"},{"M","BE"},{"A","BF"}
									};	
														

struct mnemonic_lookup dad_lookup[]={
										{"B","09"},{"D","19"},{"H","29"},{"SP","39"}
									};							

													
struct mnemonic_lookup dcr_lookup[]={
										{"B","05"},{"C","0D"},{"D","15"},{"E","1D"},
										{"H","25"},{"L","2D"},{"M","35"},{"A","3D"}
									};		
														

struct mnemonic_lookup dcx_lookup[]={
										{"B","0B"},{"D","1B"},{"H","2B"},{"SP","3B"}
									};
														

struct mnemonic_lookup inr_lookup[]={
										{"B","04"},{"C","0C"},{"D","14"},{"E","1C"},
										{"H","24"},{"L","2C"},{"M","34"},{"A","3C"}
									};
														
	
struct mnemonic_lookup inx_lookup[]={
										{"B","03"},{"D","13"},{"H","23"},{"SP","33"}
									};							

												
struct mnemonic_lookup lxi_lookup[]={
										{"B","01"},{"D","11"},{"H","21"},{"SP","31"}
									};
														

struct mnemonic_lookup mvi_lookup[]={
										{"B","06"},{"C","0E"},{"D","16"},{"E","1E"},
										{"H","26"},{"L","2E"},{"M","36"},{"A","3E"}
									};
														

struct mnemonic_lookup ora_lookup[]={
										{"B","B0"},{"C","B1"},{"D","B2"},{"E","B3"},
										{"H","B4"},{"L","B5"},{"M","B6"},{"A","B7"}
									};							

													
struct mnemonic_lookup pop_lookup[]={
										{"B","C1"},{"D","D1"},{"H","E1"},{"PSW","F1"}
									};						

													
struct mnemonic_lookup push_lookup[]={
										{"B","C5"},{"D","D5"},{"H","E5"},{"PSW","F5"}
									};
														

struct mnemonic_lookup sbb_lookup[]={
										{"B","98"},{"C","99"},{"D","9A"},{"E","9B"},
										{"H","9C"},{"L","9D"},{"M","9E"},{"A","9F"}
									};
														
					
struct mnemonic_lookup sub_lookup[]={
										{"B","90"},{"C","91"},{"D","92"},{"E","93"},
										{"H","94"},{"L","95"},{"M","96"},{"A","97"}
									};
														

struct mnemonic_lookup xra_lookup[]={
										{"B","A8"},{"C","A9"},{"D","AA"},{"E","AB"},
										{"H","AC"},{"L","AD"},{"M","AE"},{"A","AF"}
									};


#endif /*MEMFILL_CALL_TABLE_H__*/
